package top.xzxsrq.fileviewutils.enums;

import lombok.Getter;
import top.xzxsrq.web.utils.WebUtils;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * 权限
 */
@Getter
public enum AuthEnum {
    cut("剪切"),
    copy("复制"),
    rename("重命名"),
    edit("编辑"),
    del("删除"),
    mkFile("创建文件"),
    mkdir("创建文件夹"),
    upload("上传"),
    share("分享");

    private final String label;

    AuthEnum(String label) {
        this.label = label;
    }

    public static String getAllAuth() {
        String collect = Arrays.stream(AuthEnum.values()).map(i -> i.name()).collect(Collectors.joining(WebUtils.split));
        return collect;
    }
}
